package com.zsrt.java.ch04;


import org.junit.Test;

public class BTreeTest {
	
	
	@Test
	public void treeTest() throws Exception {
		Node head = new Node(10);
		
		BTree tree  = new BTree(head);
		
		//1 添加3个节点  3 5 9
		Node node1 = new Node(3);
		Node node2 = new Node(9);
		Node node3 = new Node(4);
		Node node4 = new Node(91);
		
		tree.insertNode(head, node1);
		tree.insertNode(head, node2);
		tree.insertNode(head, node3);
		tree.insertNode(head, node4);
		
		//System.out.println(tree.getMax(head).getData());
		
		//先根遍历  中根遍历  后根遍历
		
		tree.printTree(head);
	}

}
